
function WxfJs()
 {
    WxfJs.data1 = new Array();

    if (typeof(WxfJs._initilize) == "undefined")
    {
        WxfJs.ActiveRow = -1;
        WxfJs.ActiveColumn = -1;
        WxfJs.PreviousRow = -1;
        WxfJs.PreviousColumn = -1;
        WxfJs.Dirty = false;
        WxfJs.Rows = 0;
        WxfJs.ScrollLeft = 0;
        WxfJs.ScrollTop = 0;
        WxfJs.Fields = 0;
        WxfJs.DataFields = null;
        WxfJs.ActiveNode = null;
        WxfJs.PreviousNode = null;
        WxfJs.DIV_View = null;
        WxfJs.Direction = -1;
        WxfJs.Editing = false;
        WxfJs.Editor = null;
        WxfJs.WxfClipBoard = "";
        WxfJs.Wxf = "";
        WxfJs.OperationMode = "";
        WxfJs.WxfRecordset = null;
        WxfJs.AbsolutePosition = 0;
        WxfJs.AbsolutePage = 1;
        WxfJs.HeaderOper = COL_HEAD_NONE;
        WxfJs.PageSize = 10;
        WxfJs.Columns = null;
        WxfJs.DoubleHeader = 'n';

        WxfJs.Mapping = null;
        WxfJs.prototype.Initialize = function(oWxf)
        {
            var aCols = null;
            var oCell;
            var i;
            var j;
            if (oWxf != null)
            {

                WxfJs.DIV_View = oWxf.parentNode;

                var oWxfMapping = [];
                WxfJs.Fields = parseInt(oWxf.getAttribute("Fields"));
                WxfJs.PageSize = parseInt(oWxf.getAttribute("pagesize"));

                WxfJs.Wxf = oWxf.getAttribute("wxf");
                WxfJs.OperationMode = oWxf.getAttribute("OperationMode");
                WxfJs.Rows = oWxf.rows.length;

                for (i = 0; i < WxfJs.Rows && i < WxfJs.PageSize; ++i)
                {
                    aCols = new Array(WxfJs.Fields);

                    oWxfMapping.push(aCols);
                }

                WxfJs.DataFields = new Array(WxfJs.Fields);

                WxfJs.Columns = document.getElementById(WxfJs.Wxf + "_coltable");
                                
                WxfJs.DoubleHeader = WxfJs.Columns.getAttribute("dh");

                var _focus = document.getElementById(WxfJs.Wxf + "_focus");

                if (oWxf.addEventListener)
                {
                    try
                    {
                        oWxf.removeEventListener("keydown", this.ProcessEvent, false);
                        _focus.removeEventListener("keydown", this.ProcessEvent, false);
                    } catch(e)
                    {
                        }
                    oWxf.addEventListener("keydown", this.ProcessEvent, false);
                    _focus.addEventListener("keydown", this.ProcessEvent, false);
                } else if (oWxf.attachEvent)
                {
                    try
                    {
                        oWxf.detachEvent("onkeydown", this.ProcessEvent);
                        _focus.detachEvent("onkeydown", this.ProcessEvent);
                    } catch(e)
                    {
                        }
                    oWxf.attachEvent("onkeydown", this.ProcessEvent);
                    _focus.attachEvent("onkeydown", this.ProcessEvent);
                } else
                {
                    oWxf.onkeydown = this.ProcessEvent;
                    if (!$.browser.msie)
                    {
                        _focus.onkeydown = this.ProcessEvent;
                    }
                }


                var aCols = oWxf.getElementsByTagName('colgroup')[0].getElementsByTagName('col');
                var hCols = WxfJs.Columns.getElementsByTagName('colgroup')[0].getElementsByTagName('col');
                var length = aCols.length;
                for (var i = 0; i < length; i++)
                {
                    aCols[i].style.pixelWidth = hCols[i].offsetWidth;
                }
                oWxf.style.pixelWidth = WxfJs.Columns.offsetWidth;

                for (i = 0; i < WxfJs.Rows && i < WxfJs.PageSize; ++i)
                {
                    iIndex = 0;

                    for (j = 0; j < WxfJs.Fields; j++)
                    {
                        if (oWxfMapping[i][j] == null)
                        {
                            oCell = oWxf.rows[i].cells[iIndex++];
                            oWxfMapping[i][j] = oCell;
                        }
                    }
                }

                try
                {
	                for (i = 0; i < WxfJs.Fields && i<WxfJs.Columns.rows[0].cells.length; ++i)
	                {
	                    var cColName = WxfJs.Columns.rows[0].cells[i].getAttribute("column");
	                    var cColType = WxfJs.Columns.rows[0].cells[i].getAttribute("datatype");
	                    var cColEdit = WxfJs.Columns.rows[0].cells[i].getAttribute("update");
	                    var cw = WxfJs.Columns.rows[0].cells[i].getAttribute("w");
	                    WxfJs.Columns.rows[0].cells[i].style.width = cw;
	                    if (WxfJs.Rows > 0)
	                    {
	                        oWxfMapping[0][i].style.pixelWidth = cw;
	                    }
	                    WxfJs.DataFields[cColName] = new Column(cColName, cColType, cColEdit, cw);
	                }
                } catch(e)
                {
                }

                WxfJs.Mapping = oWxfMapping;

                var oWxfCR = document.getElementById(WxfJs.Wxf + "_CR");
                if (oWxfCR)
                {
                    oWxfCR.style.pixelWidth = 34;
                }

                var oWxfCRCK = document.getElementById(WxfJs.Wxf + "_CR_CK");
                if (oWxfCRCK)
                {
                    oWxfCRCK.style.pixelWidth = 21;
                }

                if (WxfJs.Rows > 0)
                {
                    var oWxfRW = document.getElementById(WxfJs.Wxf + "_RW_1");
                    if (oWxfRW)
                    {
                        oWxfRW.style.pixelWidth = 40;
                    }
                    var oWxfRWCK = document.getElementById(WxfJs.Wxf + "_RW_1_CK");
                    if (oWxfRWCK)
                    {
                        oWxfRWCK.style.pixelWidth = 21;
                    }
                }

                if (WxfJs.OperationMode != "ReadOnly")
                {
                    var cXMLDAT = document.getElementById(WxfJs.Wxf + "_XMLDAT").value;
                    cXMLDAT = decodeURIComponent(cXMLDAT);

                    if (window.ActiveXObject && $.browser.msie)
                    {
                        var doc = new ActiveXObject("Microsoft.XMLDOM");
                        doc.async = "false";
                        doc.loadXML(cXMLDAT);
                        WxfJs.WxfRecordset = new XMLRecordset(doc.documentElement)
                    }
                    // code for Mozilla, Firefox, Opera, etc.
                    else
                    {
                        var parser = new DOMParser();
                        var doc = parser.parseFromString(cXMLDAT, "text/xml");
                        WxfJs.WxfRecordset = new XMLRecordset(doc.documentElement)
                    }
                }
            }
        };

        WxfJs.prototype.XFocus = function()
        {
            var _focus = document.getElementById(WxfJs.Wxf + "_focus");
            _focus.focus();
        }

        WxfJs.prototype.getRender = function(cell)
        {
            var t = cell;
            if (t.children.length > 0 && typeof(t.children[0].value) != "undefined")
            {
                t = t.children[0];
            }

            return t;
        }

        WxfJs.prototype.Edit_Bef = function()
        {
            if ((WxfJs.OperationMode == "ReadOnly") || (WxfJs.Editing))
            {
                return;
            }

            var cell = WxfJs.ActiveNode;
            if (cell == null)
            {
                return;
            }
            
            var render = WxfJs.getRender(cell);

            var colname = cell.getAttribute("column");

            if (WxfJs.DataFields[colname])
            {
                var cReadonly = WxfJs.DataFields[colname].Readonly;
                if (!cReadonly)
                {
                    WxfJs.Editor = document.createElement('<INPUT type="text">');

                    if (oHandlingKeyboard)
                    {
                        oHandlingKeyboard.RegisterEvents(WxfJs.Editor);
                    }

                    WxfJs.Editor.style.position = "absolute";
                    WxfJs.Editor.id = WxfJs.Wxf + "_cell_editor";
                    WxfJs.Editor.style.top = cell.offsetTop + render.clientTop - 2;
                    WxfJs.Editor.style.left = cell.offsetLeft - 1;
                    WxfJs.Editor.style.width = cell.clientWidth + 4;
                    WxfJs.Editor.style.height = cell.offsetHeight + 2;
                    WxfJs.Editor.style.paddingTop = 2;
                    WxfJs.Editor.style.border = "2px solid #000000";

                    WxfJs.Editor.readOnly = false;
                    WxfJs.Editor.setAttribute("wxfsuggest", "wxf");
                    WxfJs.Editor.setAttribute("datatype", WxfJs.DataFields[colname].DataType);
                    WxfJs.Editor.value = cell.innerHTML;
                    var eLName = colname.replace(".", "_");
                    var eL = document.getElementById("Txt_" + eLName);
                    if (eL)
                    {
                        WxfJs.Editor.setAttribute("autocomplete", "off");
                        WxfJs.Editor.setAttribute("class", eL.getAttribute("class"));
                        WxfJs.Editor.setAttribute("uget_code", eL.getAttribute("uget_code"));
                        WxfJs.Editor.setAttribute("maxlength", eL.getAttribute("maxlength"));
                        WxfJs.Editor.setAttribute("scale", eL.getAttribute("scale"));
                    }
                    else
                    {
                        WxfJs.Editor.setAttribute("uget_code", "");
                    }
                    WxfJs.Editor.setAttribute("datatype", WxfJs.DataFields[colname].DataType);
                    WxfJs.getValue();

                    cell.appendChild(WxfJs.Editor);

                    cell.style.border = "1px solid LightGrey";
                    WxfJs.Editor.focus();
                    WxfJs.Editor.select();
                    WxfJs.Editing = true;
                    WxfJs.PreviousNode = cell;
                }
            }
        };

        WxfJs.prototype.getValue = function()
        {
            var cValue = null;
            var tmp = WxfJs.ActiveNode.parentNode.getAttribute("row");

            if (IsNumeric(tmp))
            {
                WxfJs.AbsolutePosition = tmp * 1;
            }
            var colname = WxfJs.ActiveNode.getAttribute("column");
            if (WxfJs.DataFields[colname])
            {
                if (WxfJs.WxfRecordset)
                {
                    WxfJs.WxfRecordset.MoveTo(WxfJs.AbsolutePosition);
                    var _cell_editor = document.getElementById(WxfJs.Wxf + "_cell_editor");
                    var eLName = colname.replace(".", "_");
                    var eL = document.getElementById("Txt_" + eLName);

                    var cPointer = 0;
                    var datatype = 'c';

                    if (eL)
                    {
                        cPointer = eL.getAttribute("scale");
                        datatype = eL.getAttribute("datatype");
                    }

                    cValue = WxfJs.WxfRecordset.getValue(colname);

                    if (cPointer && datatype == 'f')
                    {
                        cValue = ReplaceAll(cValue, ",", "");
                        if (IsNumeric(cValue))
                        {
                            cValue = cValue * 1;
                            cValue = Commify(cValue.toFixed(cPointer));
                        }
                        else
                        {
                            cValue = 0;
                        }
                    }

                    WxfJs.ActiveNode.innerHTML = cValue;

                    if (_cell_editor)
                    {
                        _cell_editor.value = cValue;
                    }
                }
            }

            var oWxfRW = document.getElementById(WxfJs.Wxf + "_RW_" + (WxfJs.PreviousRow + 1));
            if (oWxfRW && WxfJs.ActiveRow != WxfJs.PreviousRow)
            {
                oWxfRW.className = "wxfrhc";
            }

            oWxfRW = document.getElementById(WxfJs.Wxf + "_RW_" + (WxfJs.ActiveRow + 1));
            if (oWxfRW)
            {
                oWxfRW.className = "wxfrha";
            }

            var oWxfCL = document.getElementById(WxfJs.Wxf + "_CL_" + (WxfJs.PreviousColumn + 1));
            if (oWxfCL)
            {
                if (WxfJs.PreviousColumn == 0)
                {
                    oWxfCL.className = "wxfchf";
                }
                else
                {
                    oWxfCL.className = "wxfchc";
                }
            }

            oWxfCL = document.getElementById(WxfJs.Wxf + "_CL_" + (WxfJs.ActiveColumn + 1));
            if (oWxfCL)
            {
                oWxfCL.className = "wxfcha";
            }

            WxfJs.PreviousRow = WxfJs.ActiveRow;
            WxfJs.PreviousColumn = WxfJs.ActiveColumn;
            return cValue;
        };

        WxfJs.prototype.setField = function(oNode, cValue)
        {
            if (!oNode)
            {
                return;
            }

            var tmp = oNode.parentNode.getAttribute("row");

            if (IsNumeric(tmp))
            {
                WxfJs.AbsolutePosition = tmp * 1;
            }
            else
            {
                return;
            }

            var colname = oNode.getAttribute("column");

            if (WxfJs.DataFields[colname])
            {
                if (WxfJs.WxfRecordset)
                {
                    WxfJs.WxfRecordset.MoveTo(WxfJs.AbsolutePosition);
                    var oldValue = WxfJs.WxfRecordset.getValue(colname);
                    if (oldValue != cValue)
                    {
                        WxfJs.WxfRecordset.setValue(colname, cValue);
                        WxfJs.prototype.Checked(WxfJs.AbsolutePosition, true);
                        oNode.innerHTML = cValue;
                    }
                }
            }
        }

        WxfJs.prototype.setValue = function()
        {
            if (!WxfJs.PreviousNode)
            {
                return;
            }
            var colname = WxfJs.PreviousNode.getAttribute("column");

            var _cell_editor = document.getElementById(WxfJs.Wxf + "_cell_editor");

            if (_cell_editor)
            {
                var eLName = colname.replace(".", "_");

                var eL = document.getElementById("Txt_" + eLName);

                var cPointer = 0;
                var datatype = 'c';

                if (eL)
                {
                    cPointer = eL.getAttribute("scale");
                    datatype = eL.getAttribute("datatype");
                }

                var cValue = _cell_editor.value;

                if (cPointer && datatype == 'f')
                {
                    cValue = ReplaceAll(cValue, ",", "");

                    if (IsNumeric(cValue))
                    {
                        cValue = cValue * 1;
                        cValue = Commify(cValue.toFixed(cPointer));
                    }
                    else
                    {
                        cValue = 0;
                    }
                }
                WxfJs.prototype.setField(WxfJs.PreviousNode, cValue);

                var _focus = document.getElementById(WxfJs.Wxf + "_focus");
                _focus.focus();

                if (_cell_editor)
                {
                    if (oHandlingKeyboard)
                    {
                        oHandlingKeyboard.XFocus(_cell_editor);
                    }
                    if (_cell_editor.parentNode)
                    {
                        _cell_editor.parentNode.removeChild(_cell_editor);
                    }
                }
                _cell_editor = null;
                WxfJs.Editor = null;
                WxfJs.PreviousNode.innerHTML = cValue;
            }
        };

        WxfJs.prototype.Checked = function(idx, bCheck)
        {
            if (IsNumeric(idx))
            {
                WxfJs.AbsolutePosition = idx * 1;
            }
            else
            {
                return;
            }

            var _ROWX = WxfJs.Wxf + "_RW_" + (idx + 1) + "_CHECKBOX";
            var obj = document.getElementById(_ROWX);
            if (obj)
            {
                if (bCheck && obj.checked == false)
                {
                    obj.checked = true;
                }
                else if (bCheck && obj.checked == false)
                {
                    obj.checked = false;
                }
            }

            if (WxfJs.WxfRecordset)
            {
                WxfJs.WxfRecordset.MoveTo(WxfJs.AbsolutePosition);

                if (bCheck)
                {
                    WxfJs.WxfRecordset.Checked();
                    var oRWV = document.getElementById(WxfJs.Wxf + "_RWV_" + (idx * 1 + 1));
                    if (oRWV)
                    {
                        oRWV.className = "wxfdra";
                    }
                }
                else
                {
                    WxfJs.WxfRecordset.Unchecked();
                    var oRWV = document.getElementById(WxfJs.Wxf + "_RWV_" + (idx * 1 + 1));
                    if (oRWV)
                    {
                        oRWV.className = "wxfdr";
                    }
                }
            }
        };

        WxfJs.prototype.setFocus = function(oEvent)
        {
            if (oEvent)
            {
                var oXEvent = new XEvent(oEvent);
                eL = oXEvent.XElement;
            }
            else
            {
                eL = WxfJs.ActiveNode;
            }
            if (eL)
            {
                var oParent = eL.parentNode;
                var iActiveColumn = WxfJs.ActiveColumn;
                var iActiveRow = WxfJs.ActiveRow;
                if (oParent.tagName.toUpperCase() != "TR")
                {
                    return;
                }
                iActiveRow = oParent.rowIndex;
                for (var i = 0; i < WxfJs.Fields; i++)
                {
                    if (WxfJs.Mapping[iActiveRow][i] == eL)
                    {
                        iActiveColumn = i;
                        break;
                    }
                }
                WxfJs.ActiveColumn = iActiveColumn;
                WxfJs.ActiveRow = iActiveRow;
                WxfJs.prototype.EnterNode(eL);
                WxfJs.prototype.XFocus();
            }
        };

        WxfJs.prototype.getNode = function(iRow, iCol)
        {
            iRow = iRow * 1;
            iCol = iCol * 1;

            if (iRow < 0 || iCol < 0)
            {
                return null;
            }

            if (iRow >= WxfJs.Rows || iCol >= WxfJs.Fields)
            {
                return null;
            }

            var cNode = WxfJs.Mapping[iRow][iCol];
            cNode == null;
            return cNode;
        };

        WxfJs.prototype.LeaveNode = function()
        {
            if (WxfJs.ActiveNode)
            {
                WxfJs.ActiveNode.style.border = "1px solid LightGrey";
                WxfJs.ActiveNode.style.paddingLeft = "4px";
                WxfJs.ActiveNode.style.paddingRight = "7px";
                if (!(WxfJs.OperationMode == "ReadOnly") || (WxfJs.Editing == false)) 
                {
                    WxfJs.prototype.setValue();
                }
            }
            if (SuggestTimer)
            {
                window.clearTimeout(SuggestTimer);
            }
            WxfJs.Editing = false;
        };

        WxfJs.prototype.UpdateNode = function()
        {
        };

        WxfJs.prototype.EnterNode = function(oNode)
        {
            if (oNode)
            {
                WxfJs.prototype.LeaveNode();

                oNode.style.border = "2px solid #000000";
                oNode.style.paddingLeft = "4px";
                oNode.style.paddingRight = "7px";

                if (WxfJs.ActiveRow == 0)
                {
                    oNode.style.borderTop = "1px solid #000000";
                }

                if (WxfJs.ActiveColumn == 0)
                {
                    oNode.style.borderLeft = "1px solid #000000";
                }


                if (WxfJs.ActiveRow == WxfJs.Rows - 1)
                {
                    oNode.style.borderBottom = "1px solid #000000";
                }

                WxfJs.ActiveNode = oNode;
                WxfJs.prototype.getValue();
                WxfJs.prototype.WxfView(oNode);
            }
        };

        WxfJs.prototype.WxfView = function(oNode)
        {
            if (WxfJs.Direction == ZDEF_DIR_L && oNode.offsetLeft < WxfJs.DIV_View.scrollLeft)
            {
                if (oNode.cellIndex > 0)
                {
                    WxfJs.DIV_View.scrollLeft = oNode.offsetLeft;
                }
                else
                {
                    WxfJs.DIV_View.scrollLeft = 0;
                }
            }
            else if (oNode.cellIndex == 0)
            {
                WxfJs.DIV_View.scrollLeft = 0;
            }

            if (WxfJs.Direction == ZDEF_DIR_R && oNode.offsetLeft + oNode.offsetWidth > WxfJs.DIV_View.scrollLeft + WxfJs.DIV_View.offsetWidth - 10)
            {
                WxfJs.DIV_View.scrollLeft += oNode.offsetWidth;
            }

            if (oNode.offsetLeft + oNode.offsetWidth > WxfJs.DIV_View.scrollLeft + WxfJs.DIV_View.clientWidth)
            {
                WxfJs.DIV_View.scrollLeft = oNode.offsetLeft + oNode.offsetWidth - WxfJs.DIV_View.clientWidth;
            }

            if (oNode.offsetTop + oNode.offsetHeight > WxfJs.DIV_View.scrollTop + WxfJs.DIV_View.clientHeight)
            {
                WxfJs.DIV_View.scrollTop = oNode.offsetTop + oNode.offsetHeight - WxfJs.DIV_View.clientHeight;
            }

            if (oNode.offsetTop < WxfJs.DIV_View.scrollTop)
            {
                WxfJs.DIV_View.scrollTop = oNode.offsetTop;
            }
        };

        WxfJs.prototype.ProcessEvent = function(e)
        {
            var oXEvent = new XEvent(e);
            oNode = oXEvent.XElement;
            window.status = oNode.id;
            kc = oXEvent["keyCode"];
            var cCancelBubble = false;
            var oNext = null;
            WxfJs.Direction = -1;
            switch (kc)
            {
            case ZDEF_LEFT:
                oNext = WxfJs.prototype.NextNode(ZDEF_DIR_L);
                cCancelBubble = true;
                break;
            case ZDEF_UP:
                oNext = WxfJs.prototype.NextNode(ZDEF_DIR_U);
                cCancelBubble = true;
                break;

            case ZDEF_TAB:
                if (oXEvent.shiftKey)
                {
                    oNext = WxfJs.prototype.NextNode(ZDEF_DIR_L);
                }
                else
                {
                    oNext = WxfJs.prototype.NextNode(ZDEF_RIGHT);
                }
                cCancelBubble = true;
                break;
            case ZDEF_ENTER:
            case ZDEF_RIGHT:
                oNext = WxfJs.prototype.NextNode(ZDEF_DIR_R);
                cCancelBubble = true;
                break;
            case ZDEF_DOWN:
                oNext = WxfJs.prototype.NextNode(ZDEF_DIR_D);
                cCancelBubble = true;
                break;
            case ZDEF_PGUP:
                oNext = WxfJs.prototype.NextNode(ZDEF_DIR_PGUP);
                cCancelBubble = true;
                break;
            case ZDEF_PGDN:
                oNext = WxfJs.prototype.NextNode(ZDEF_DIR_PGDN);
                cCancelBubble = true;
                break;
            case ZDEF_HOME:
                oNext = WxfJs.prototype.NextNode(ZDEF_DIR_HOME);
                cCancelBubble = true;
                break;
            case ZDEF_END:
                oNext = WxfJs.prototype.NextNode(ZDEF_DIR_END);
                cCancelBubble = true;
                break;
            case ZDEF_ESCAPE:
                WxfJs.prototype.WxfCancel();
                cCancelBubble = true;
                return false;
            case ZDEF_CTRL:
                return true;
            case ZDEF_SHIFT:
                return true;
            case ZDEF_ALT:
                return true;
            default:
                {
                    if (kc == 67 && oXEvent.ctrlKey && (!WxfJs.Editing))
                    {
                    }
                    else if (kc == 86 && oXEvent.ctrlKey && (!WxfJs.Editing))
                    {

                    }
                    else if (kc == 88 && oXEvent.ctrlKey && (!WxfJs.Editing))
                    {
                    }
                    else
                    {
                        WxfJs.prototype.Edit_Bef();
                        return true;
                    }
                    cCancelBubble = true;
                    break;
                }
            }

            WxfJs.prototype.EnterNode(oNext);

            if (cCancelBubble == true)
            {
                oXEvent.FreezeEvent();
                return false;
            }
            else
            {
                return true;
            }
        };

        WxfJs.prototype.NextNode = function(iDirection)
        {
            var oNext = null;
            var iCol = WxfJs.ActiveColumn;
            var iRow = WxfJs.ActiveRow;
            var iRowCount = WxfJs.Rows;
            var iFields = WxfJs.Fields;
            var aTemps = null;
            var iActiveColumn = iCol;
            var iActiveRow = iRow;

            var iTemp = "";
            var sTemp = "";
            var sStr = "";

            switch (iDirection)
            {
            case ZDEF_DIR_U:
                if (iRow > 0)
                {
                    iRow--;
                }
                break;
            case ZDEF_DIR_D:
                if (iRow < WxfJs.Rows - 1)
                {
                    iRow++;
                }
                break;
            case ZDEF_DIR_L:
                if (iCol > 0)
                {
                    iCol--;
                }
                break;
            case ZDEF_DIR_R:
                if (iCol < iFields - 1)
                {
                    iCol++;
                }
                break;
            case ZDEF_DIR_PGUP:
                iRow = iRow - 10;
                if (iRow < 0)
                {
                    iRow = 0;
                }
                break;
            case ZDEF_DIR_PGDN:
                iRow = iRow + 10;
                if (iRow >= WxfJs.Rows)
                {
                    iRow = WxfJs.Rows - 1;
                }
                break;

            case ZDEF_DIR_HOME:
                iCol = 0;
                break;

            case ZDEF_DIR_END:
                iCol = iFields - 1;
                break;
            }

            oNext = WxfJs.Mapping[iRow][iCol];

            WxfJs.Direction = iDirection;

            WxfJs.ActiveColumn = iCol;
            WxfJs.ActiveRow = iRow;
            return oNext;
        };


    }
    WxfJs._Initilize = true;
}

XWxf.prototype.prototype = WxfJs.prototype;

function XWxf()
{
}
